<template>
  <div id="App">
    <router-view class="view" />
  </div>
</template>

<script setup>
import { watchEffect } from 'vue';
import { useStore } from 'vuex';
const store = useStore()

// 监听theme变化
watchEffect(() => document.querySelector('html').setAttribute('theme', store.state.theme))


</script>

<style lang='less'>
@import "normalize.css";
@import "element-plus/dist/index.css";
@import "@/assets/style/index.less";
@import "@/assets/style/iconfont.less";
@import "@/assets/style/theme.less";
#App {
  width: 100%;
  overflow: hidden;
  height: 100vh;
  display: flex;
  .view {
    flex: 1;
  }
}
</style>
